
Product
Socket Now Available on Google Cloud Marketplace
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.
antd-style
Advanced tools
css-in-js solution for application combine with antd v5 token system and emotion
A business-level css-in-js
solution built on the Ant Design V5 Token System. It is based on emotion at the bottom.
It is recommended to install using pnpm
pnpm i antd-style -S
import { createStyles } from 'antd-style';
const useStyles = createStyles(({ token, css }) => ({
// Supports the writing style of css object
container: {
backgroundColor: token.colorBgLayout,
borderRadius: token.borderRadiusLG,
maxWidth: 400,
width: '100%',
height: 180,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'column',
marginLeft: 'auto',
marginRight: 'auto',
},
// Also supports obtaining the same writing experience as normal css through css string templates
card: css`
box-shadow: ${token.boxShadow};
padding: ${token.padding}px;
border-radius: ${token.borderRadius}px;
color: ${token.colorTextTertiary};
background: ${token.colorBgContainer};
transition: all 100ms ${token.motionEaseInBack};
margin-bottom: 8px;
cursor: pointer;
&:hover {
color: ${token.colorTextSecondary};
box-shadow: ${token.boxShadowSecondary};
}
`,
}));
export default () => {
// The styles object in the useStyles method is cached by default, so there is no need to worry about re-rendering issues
const { styles, cx, theme } = useStyles();
return (
// Use cx to organize className
<div className={cx('a-simple-create-style-demo-classname', styles.container)}>
<div className={styles.card}>createStyles Demo</div>
{/* The theme object contains all token and theme information */}
<div>Current theme mode: {theme.appearance}</div>
</div>
);
};
Details: CHANGELOG
FAQs
css-in-js solution for application combine with antd v5 token system and emotion
The npm package antd-style receives a total of 80,251 weekly downloads. As such, antd-style popularity was classified as popular.
We found that antd-style demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.
Security News
Corepack will be phased out from future Node.js releases following a TSC vote.
Research
Security News
Research uncovers Black Basta's plans to exploit package registries for ransomware delivery alongside evidence of similar attacks already targeting open source ecosystems.