baseUI 中 styletron方法 伪类伪元素设置

import { styled } from "styletron-react";

export default () => {
  const Button = styled("button", {
    color: "white",
    backgroundColor: "white",
    "::before": {
      content: ‘"…"‘,
      color: "black",
      display: "block",
      position: "absolute"
    }
  });
  return <Button>xx</Button>;
};
import { styled } from ‘baseui‘;

const AvatarBoxItem = styled(‘div‘, ()=>{
  return {
    textAlign:‘center‘,
    color: ‘#333‘,
    ":hover": {
      color:‘red‘    
    }
  }
});

 

 

 

 

参考https://www.styletron.org/concepts#quotes

baseUI 中 styletron方法 伪类伪元素设置

上一篇:Type string trivially inferred from a string literal, remove type annotation


下一篇:数据分析 - 指标体系