Skip to content
Discussion options

You must be logged in to vote

you can make your own component wrapping a factory with style props like this

Use the HTMLStyledProps type to get the types of an element in addition to the style props.

import { styled } from '../styled-system/jsx'
import type { HTMLStyledProps } from '../styled-system/jsx'

type ButtonProps = HTMLStyledProps<'button'> 

const Button = (props: ButtonProps) => {
  return <styled.button {...props}>
}

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@55Cancri
Comment options

@astahmer
Comment options

Answer selected by astahmer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #913 on July 02, 2023 23:24.