Skip to content

Commit

Permalink
chor(components): describe view and text styles type, apply textStyle…
Browse files Browse the repository at this point in the history
… to Text element
  • Loading branch information
francescochiapello committed Sep 24, 2024
1 parent 471ca47 commit 86617c5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/solid/components/Input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,13 @@ const Input: Component<InputProps> = props => {
onLeft={onLeft}
onRight={onRight}
// @ts-expect-error TODO type needs to be fixed in framework
style={[
props.style, //
styles.Container.tones[props.tone ?? styles.tone],
styles.Container.base
]}
style={[props.style, styles.Container.tones[props.tone ?? styles.tone], styles.Container.base]}
>
<Text
tone={props.tone ?? styles.tone}
color={props.textColor}
style={[
props.textStyle,
styles.Text.tones[props.tone ?? styles.tone], //
styles.Text.base
]}
Expand Down
10 changes: 10 additions & 0 deletions packages/solid/components/Input/Input.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ export interface InputProps extends UIComponentProps, InputStyleProperties {
*/
titleSignal: Signal<string>;

/**
* general styles applied to input `View` container
*/
style?: unknown;

/**
* specific styles applied to input `Text` item
*/
textStyle?: unknown;

/**
* when true the content will be masked to the user
*/
Expand Down

0 comments on commit 86617c5

Please sign in to comment.