mirror of
https://github.com/zhigang1992/react.git
synced 2026-02-10 17:13:54 +08:00
34 lines
746 B
TypeScript
34 lines
746 B
TypeScript
import React from 'react'
|
|
import withDefaults from '../utils/with-defaults'
|
|
|
|
interface Props {
|
|
width?: string
|
|
}
|
|
|
|
const defaultProps = {
|
|
width: '1.25em'
|
|
}
|
|
|
|
export type SelectIconProps = Props & typeof defaultProps
|
|
|
|
const SelectIcon: React.FC<SelectIconProps> = React.memo(({
|
|
width,
|
|
}) => {
|
|
|
|
return (
|
|
<svg viewBox="0 0 24 24" width={width} height={width} strokeWidth="1" strokeLinecap="round"
|
|
strokeLinejoin="round" fill="none" shapeRendering="geometricPrecision">
|
|
<path d="M6 9l6 6 6-6" />
|
|
<style jsx>{`
|
|
svg {
|
|
color: inherit;
|
|
stroke: currentColor;
|
|
transition: all 200ms ease;
|
|
}
|
|
`}</style>
|
|
</svg>
|
|
)
|
|
})
|
|
|
|
export default withDefaults(SelectIcon, defaultProps)
|