Kyrylo Yakovenko(@blia)
import styled from 'styled-components' ;const RedText= styled.Text` color :red ;font-size :16 ;` ;const BlueText= styled.Text` color :blue ;font-size :16 ;` ;<RedText >just red</RedText ><BlueText >just blue</BlueText >
import css from 'my-css-lib' ;const { RedText, BlueText }= css` .red-text {color :red ;font-size :16 ;}.blue-text {color :blue ;font-size :16 ;}` ;<RedText >just red</RedText ><BlueText >just blue</BlueText >
import css from 'my-css-lib' ;const { RedText, BlueText }= css` .red-text {color :red ;font-size :16 ;}.blue-text {color :blue ;font-size :16 ;}` ;<RedText >just red</RedText ><BlueText >just blue</BlueText >
import css from 'my-css-lib' ;const { RedText, BlueText }= css` div.red-text {color :red ;font-size :16 ;}p.blue-text {color :blue ;font-size :16 ;}` ;<RedText >just red</RedText ><BlueText >just blue</BlueText >
import css from 'my-css-lib' ;import ActionButton from './action-button' ;const { LoginButton }= css` ActionButton.login-button {background-color :green ;font-size :16 ;}` ;<LoginButton >Log in</LoginButton >
import css from 'my-css-lib' ;const { Link }= css` a.link {color :blue ;text-decoration :underline ;:hover {text-decoration :none ;}}` ;<Link href="/" >Home</Link >
import css from 'my-css-lib' ;const { Link }= css` a.link {color :blue ;text-decoration :underline ;:hover {text-decoration :none ;}:is-active {color :red ;}}` ;<Link href="/" isActive={isHomePage}>Home</Link >
import css from 'my-css-lib' ;const { Link }= css` a.link {color : ${props=> props.isActive ?'red' :'blue' };text-decoration :underline ;:hover {text-decoration :none ;}}` ;<Link href="/" isActive={isHomePage}>Home</Link >
import css from 'my-css-lib' ;const { MyButton }= css` .my-button {color :blue ;display :block ;}` ;
import css from 'my-css-lib' ;const { MyButton }= css` .my-button {css.color('blue' );css.display('block' );}` ;
import css from 'my-css-lib' ;const { MyButton }= css` .my-button {...{color:'blue' };...{display:'block' };}` ;
import css from 'my-css-lib' ;css.use('box' , size=> ({width: size, height: size}));const { MyBox }= css` .my-box {background-color:green ;box:20 px;}` ;
import css from 'my-css-lib' ;css.use('box' , size=> ({width: size, height: size}));const { MyBox }= css` .my-box {background-color:green ;width:20 px;height:20 px;}` ;
import css from 'my-css-lib' ;const box= size=> ({width: size, height: size});css.use({ box });const { MyBox }= css` .my-box {background-color:green ;box:20 px;}` ;
import css from 'my-css-lib' ;import polished from 'polished' ;css.use('po' , polished);const { MyCell }= css` .my-cell {display:table-cell ;-po-ellipsis:250 px;}` ;
import css from 'my-css-lib' ;const activeColor= color=> ctx=> ({color: ctx.isActive ? color :'blue' });css.use({ activeColor });const { Link }= css` a.link {active-color :red ;text-decoration :underline ;}` ;<Link href="/" isActive={isHomePage}>Home</Link >
import css from 'my-css-lib' ;const activeColor= color=> ctx=> ({color: ctx.isActive ? color :'blue' });const { Link }= css` a.link {-local-active-color :red ;text-decoration :underline ;}` ;<Link href="/" isActive={isHomePage}>Home</Link >
import css from 'my-css-lib' ;const activeColor= color=> ctx=> ({color: ctx.isActive ? color :'blue' });const { Link }= css` a.link {-active-color :red ;text-decoration :underline ;}` ;<Link href="/" isActive={isHomePage}>Home</Link >