@reown/appkit-ui
Version:
The full stack toolkit to build onchain app UX.
106 lines (88 loc) • 2.52 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;
border-radius: ${({ borderRadius }) => borderRadius[32]};
}
wui-image {
border-radius: 100%;
}
wui-text {
padding-left: ${({ spacing }) => spacing[1]};
}
.left-icon-container,
.right-icon-container {
width: 24px;
height: 24px;
justify-content: center;
align-items: center;
}
wui-icon {
color: ${({ tokens }) => tokens.theme.iconDefault};
}
/* -- Sizes --------------------------------------------------- */
button[data-size='lg'] {
height: 32px;
}
button[data-size='md'] {
height: 28px;
}
button[data-size='sm'] {
height: 24px;
}
button[data-size='lg'] wui-image {
width: 24px;
height: 24px;
}
button[data-size='md'] wui-image {
width: 20px;
height: 20px;
}
button[data-size='sm'] wui-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;
}
/* -- Variants --------------------------------------------------------- */
button[data-type='filled-dropdown'] {
background-color: ${({ tokens }) => tokens.theme.foregroundPrimary};
}
button[data-type='text-dropdown'] {
background-color: transparent;
}
/* -- 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) and (pointer: fine) {
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