Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Font size presets UI #63057

Open
wants to merge 18 commits into
base: trunk
Choose a base branch
from
Open
Prev Previous commit
Next Next commit
add disable prop
  • Loading branch information
matiasbenedetto committed Jun 28, 2024
commit 923bc76a10160b9f25c7bc8df9ffab7fa4f5647c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const DEFAULT_UNITS = [ 'px', 'em', 'rem', 'vw', 'vh' ];

function SizeControl( props ) {
const { baseControlProps } = useBaseControlProps( props );
const { value, onChange, fallbackValue } = props;
const { value, onChange, fallbackValue, disabled } = props;

const units = useCustomUnits( {
availableUnits: DEFAULT_UNITS,
Expand Down Expand Up @@ -58,6 +58,7 @@ function SizeControl( props ) {
onChange={ handleUnitControlChange }
units={ units }
min={ 0 }
disabled={ disabled }
/>
</FlexItem>
<FlexItem isBlock>
Expand All @@ -75,6 +76,7 @@ function SizeControl( props ) {
min={ 0 }
max={ isValueUnitRelative ? 10 : 100 }
step={ isValueUnitRelative ? 0.1 : 1 }
disabled={ disabled }
/>
</Spacer>
</FlexItem>
Expand Down
Loading