forked from pagopa/io-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: [IAI-269] Add the new
IconButton
and IconButtonSolid
compo…
…nents (pagopa#4375) ###⚠️ This PR depends on pagopa#4363 ## Short description This PR adds the new `IconButton` component. For the underlying architecture, consider the pagopa#4356 as a reference. The configuration for the single variant is shown below: ```ts // Primary button primary: { background: { default: hexToRgba(IOColors.blue, 0), pressed: hexToRgba(IOColors.blue, 0.15), disabled: "transparent" }, icon: { default: IOColors.blue, pressed: IOColors.blue, disabled: hexToRgba(IOColors.blue, 0.25) } }, ``` ## List of changes proposed in this pull request - Add the new `IconButton` component - Add the new `AnimatedIcon` component, which accepts generic `ColorValue` values instead of the original `Icon` component's `IOColorType` - Refactor the various Icon components to set a color through the parent `Svg` container (using `fill="currentColor"` instead of `fill={color}` with the `color` prop). This change is necessary to allow color transitions between different states - Wrap the functional `AnimatedIcon` component to turn it into a class component. The class component can be turned into an animatable component, manageable through Reanimated library ### Preview https://user-images.githubusercontent.com/1255491/220594790-3295719a-9851-4fe9-a1ed-df2b6784b08e.mov ## How to test Go to the `Profile → Design System → Buttons` --------- Co-authored-by: Fabio Bombardi <[email protected]>
- Loading branch information
1 parent
efb9a0b
commit 7771cf9
Showing
152 changed files
with
1,621 additions
and
598 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React from "react"; | ||
import { Svg, Path } from "react-native-svg"; | ||
import { SVGIconProps } from "../Icon"; | ||
|
||
const IconArrowBottom = ({ size, style }: SVGIconProps) => ( | ||
<Svg width={size} height={size} viewBox="0 0 24 24" style={style}> | ||
<Path | ||
d="M6.49 17.383a1 1 0 1 0-1.281 1.536l5.36 4.467a2 2 0 0 0 2.56 0l5.36-4.467a1 1 0 1 0-1.28-1.536l-4.36 3.633V1.15a1 1 0 1 0-2 0v19.865l-4.36-3.633Z" | ||
fill="currentColor" | ||
/> | ||
</Svg> | ||
); | ||
|
||
export default IconArrowBottom; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.