mirror of
https://github.com/zhigang1992/wallet.git
synced 2026-01-12 22:53:27 +08:00
20 lines
512 B
JavaScript
20 lines
512 B
JavaScript
import { mapObject } from '../helpers.js';
|
|
import { css } from '../css/index.js';
|
|
|
|
const hstackConfig = {
|
|
transform(props) {
|
|
const { justify, gap = "10px", ...rest } = props;
|
|
return {
|
|
display: "flex",
|
|
alignItems: "center",
|
|
justifyContent: justify,
|
|
gap,
|
|
flexDirection: "row",
|
|
...rest
|
|
};
|
|
}}
|
|
|
|
export const getHstackStyle = (styles = {}) => hstackConfig.transform(styles, { map: mapObject })
|
|
|
|
export const hstack = (styles) => css(getHstackStyle(styles))
|
|
hstack.raw = (styles) => styles |