Skip to content

Commit

Permalink
Elevation support inline style css variable
Browse files Browse the repository at this point in the history
  • Loading branch information
lerte committed Jun 10, 2024
1 parent 062c6d0 commit 98b4501
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions packages/actify/src/components/Elevation/Elevation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@ import React from 'react'
import clsx from 'clsx'
import elevation from './elevation.module.css'

interface ElevationProps extends React.ComponentProps<'span'> {
interface ElevationProps
extends Omit<React.ComponentProps<'span'>, 'children'> {
disabled?: boolean
}

const Elevation = ({ disabled = false }: ElevationProps) => {
return (
<span
aria-hidden="true"
className={clsx(elevation['shadow'], disabled && elevation['disabled'])}
/>
)
const Elevation = ({ disabled = false, ...rest }: ElevationProps) => {
const classes = clsx(elevation['shadow'], disabled && elevation['disabled'])
return <span {...rest} aria-hidden="true" className={classes} />
}

Elevation.displayName = 'Actify.Elevation'
Expand Down

0 comments on commit 98b4501

Please sign in to comment.