@lightningjs/solid-ui
Advanced tools
Comparing version
@@ -18,27 +18,6 @@ /* | ||
import type { TextStyles, NodeStyles } from '@lightningjs/solid'; | ||
import theme from 'theme'; | ||
import type { Tone } from '../../types/types.js'; | ||
import type { ComponentStyleConfig, NodeStyleSet, TextStyleSet } from '../../types/types.js'; | ||
import { makeComponentStyles } from '../../utils/index.js'; | ||
import type { ButtonStyles, ButtonConfig } from './Button.types.js'; | ||
export interface ButtonStyles { | ||
tone: Tone; | ||
Container: NodeStyleSet<{ padding: number[] }>; | ||
Content: NodeStyleSet; | ||
Text: TextStyleSet; | ||
} | ||
type ButtonStyleProperties = { | ||
backgroundColor?: NodeStyles['color']; | ||
radius?: NodeStyles['borderRadius']; | ||
contentColor?: NodeStyles['color']; | ||
justifyContent?: NodeStyles['justifyContent']; | ||
textAlign?: TextStyles['textAlign']; | ||
textColor?: TextStyles['color']; | ||
padding?: number[]; | ||
}; | ||
type ButtonConfig = ComponentStyleConfig<ButtonStyleProperties>; | ||
/* @ts-expect-error next-line themes are supplied by client applications so this setup is necessary */ | ||
@@ -60,3 +39,4 @@ const { Button: { defaultTone, ...buttonThemeStyles } = { buttonThemeStyles: {} } } = theme?.componentConfig; | ||
color: 'backgroundColor', | ||
justifyContent: 'justifyContent' | ||
justifyContent: 'justify', | ||
itemSpacing: 'contentSpacing' | ||
}, | ||
@@ -63,0 +43,0 @@ base: { |
@@ -18,8 +18,4 @@ /* | ||
export { | ||
default as default, | ||
ButtonContainer, | ||
type ButtonProps, | ||
type ButtonContainerProps | ||
} from './Button.jsx'; | ||
export { default as buttonStyles, type ButtonStyles } from './Button.styles.js'; | ||
export { default as default, ButtonContainer } from './Button.jsx'; | ||
export { default as buttonStyles } from './Button.styles.js'; | ||
export type { ButtonProps, ButtonStyles } from './Button.types.js'; |
{ | ||
"name": "@lightningjs/solid-ui", | ||
"version": "0.17.0", | ||
"version": "0.17.1", | ||
"description": "A shared library of components for the LightningJS Solid Framework.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
2199051
0.03%129
0.78%26295
0.12%