![38% of CISOs Fear They’re Not Moving Fast Enough on AI](https://cdn.sanity.io/images/cgdhsj6q/production/faa0bc28df98f791e11263f8239b34207f84b86f-1024x1024.webp?w=400&fit=max&auto=format)
Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@hixme-ui/theme-props
Advanced tools
Utility for parsing theme properties by CSS attribute name and props passed in by the component
npm i --save @hixme-ui/theme-props
These are named exports from the theme props package. The default function uses the the base theme.colors
object as shown above.
This container example defaults to none
for the background, but if white
is sent a boolean prop, it will add the blue background color from the theme.
import styled from 'styled-components'
import { getBackgroundColor } from '@hixme-ui/theme-props'
const Container = styled.div`
background: ${(props) => getBackgroundColor(props, 'none')
`
theme.backgroundColors
theme.borderColors
theme.buttonBorderRadius
theme.fontSizes
theme.buttonGradientColors
theme.buttonHeights
theme.buttonMinWidths
theme.buttonTextColors
theme.fontFamily
theme.fontSizes
theme.fontWeights
theme.outlineButtonColors
theme.shadows
theme.textColors
Top level function by which all other theme prop utilities are built. The propsName
should map to a object of values on the theme.
import React from 'react'
import styled from 'styled-components'
import themeProps from '@hixme-ui/theme-props'
const theme = {
colors: {
white: '#ffffff',
black: '#000000',
red: '#ff0000',
green: '#00ff00',
blue: '#0000ff',
}
}
const ColorText = styled.span`
color: ${props => getTextColor(props, '#000000')};
`
const App = () => (
<ThemeProvider theme={theme}>
<ColorText green>Hello!</ColorText>
<ColorText blue>Hope you have a great day!</ColorText>
</ThemeProvider>
)
FAQs
hixme-ui theme props getters
We found that @hixme-ui/theme-props demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.