@reown/appkit-ui
Version:
The full stack toolkit to build onchain app UX.
126 lines (106 loc) • 2.87 kB
JavaScript
import { css } from '../../utils/ThemeHelperUtil.js';
export default css `
button {
display: block;
display: flex;
align-items: center;
padding: ${({ spacing }) => spacing[1]};
transition: background-color ${({ durations }) => durations['lg']}
${({ easings }) => easings['ease-out-power-2']};
will-change: background-color;
background-color: ${({ tokens }) => tokens.theme.foregroundPrimary};
border-radius: ${({ borderRadius }) => borderRadius[32]};
}
wui-image {
border-radius: ${({ borderRadius }) => borderRadius[32]};
}
wui-text {
padding-left: ${({ spacing }) => spacing[1]};
padding-right: ${({ spacing }) => spacing[1]};
}
.left-icon-container {
width: 24px;
height: 24px;
justify-content: center;
align-items: center;
}
.left-image-container {
position: relative;
justify-content: center;
align-items: center;
}
.chain-image {
position: absolute;
border: 1px solid ${({ tokens }) => tokens.theme.foregroundPrimary};
}
/* -- Sizes --------------------------------------------------- */
button[data-size='lg'] {
height: 32px;
}
button[data-size='md'] {
height: 28px;
}
button[data-size='sm'] {
height: 24px;
}
button[data-size='lg'] .token-image {
width: 24px;
height: 24px;
}
button[data-size='md'] .token-image {
width: 20px;
height: 20px;
}
button[data-size='sm'] .token-image {
width: 16px;
height: 16px;
}
button[data-size='lg'] .left-icon-container {
width: 24px;
height: 24px;
}
button[data-size='md'] .left-icon-container {
width: 20px;
height: 20px;
}
button[data-size='sm'] .left-icon-container {
width: 16px;
height: 16px;
}
button[data-size='lg'] .chain-image {
width: 12px;
height: 12px;
bottom: 2px;
right: -4px;
}
button[data-size='md'] .chain-image {
width: 10px;
height: 10px;
bottom: 2px;
right: -4px;
}
button[data-size='sm'] .chain-image {
width: 8px;
height: 8px;
bottom: 2px;
right: -3px;
}
/* -- Focus states --------------------------------------------------- */
button:focus-visible:enabled {
background-color: ${({ tokens }) => tokens.theme.foregroundSecondary};
box-shadow: 0 0 0 4px ${({ tokens }) => tokens.core.foregroundAccent040};
}
/* -- Hover & Active states ----------------------------------------------------------- */
@media (hover: hover) {
button:hover:enabled,
button:active:enabled {
background-color: ${({ tokens }) => tokens.theme.foregroundSecondary};
}
}
/* -- Disabled states --------------------------------------------------- */
button:disabled {
background-color: ${({ tokens }) => tokens.theme.foregroundSecondary};
opacity: 0.5;
}
`;
//# sourceMappingURL=styles.js.map