import { __ } from '@wordpress/i18n'; import Checkbox from './Checkbox'; import Input from './Input'; import TransparentColorPicker from './TransparentColorPicker'; type FontStyleValue = { bold: boolean; italic: boolean; underline: boolean; }; type LinkStyleCardProps = { title?: string; fontStyle: FontStyleValue; onFontStyleChange: ( value: FontStyleValue ) => void; color: string; onColorChange: ( value: string ) => void; fontSize: number; onFontSizeChange: ( value: number ) => void; fontSizeMin?: number; fontSizeMax?: number; fontStyleDescription?: string; colorDescription?: string; fontSizeDescription?: string; fontStyleCardClassName?: string; fontSizeLabel?: string; }; const LinkStyleCard = ( { title, fontStyle, onFontStyleChange, color, onColorChange, fontSize, onFontSizeChange, fontSizeMin = 10, fontSizeMax = 40, fontStyleDescription, colorDescription, fontSizeDescription, fontStyleCardClassName = '', fontSizeLabel, }: LinkStyleCardProps ) => (

{ title ?? __( 'Link', 'airygen-seo' ) }

{ __( 'Font style', 'airygen-seo' ) }

{ fontStyleDescription ?

{ fontStyleDescription }

: null }
onFontStyleChange( { ...fontStyle, bold: value } ) } /> onFontStyleChange( { ...fontStyle, italic: value } ) } /> onFontStyleChange( { ...fontStyle, underline: value } ) } />
{ colorDescription ?

{ colorDescription }

: null }
onFontSizeChange( Math.max( fontSizeMin, Math.min( fontSizeMax, Number( value ) || 0 ) ) ) } /> { fontSizeDescription ?

{ fontSizeDescription }

: null }
); export type { FontStyleValue }; export default LinkStyleCard;