-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
Have you considered adding styled components composition attrs API?
Example for this library.
import styled from "solid-styled-components"
const First = styled("div").attrs((props: { size: number }) => ({
weight: Math.max(100, Math.min(1000, size))
})`
font-weight: ${props => props.weight};
`
const First = styled("div").attrs({
weight: 500
})`
font-weight: ${props => props.weight};
`It's great for adding default or derived props that apply to element attributes.
I may be able to provide the PR.
Metadata
Metadata
Assignees
Labels
No labels