Skip to content

Commit fee2542

Browse files
committed
feat: update WorkspaceIcon to support opacity and fill colors
Signed-off-by: Aditya Mohan <[email protected]>
1 parent 7e3ae4a commit fee2542

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/icons/Workspace/WorkspaceIcon.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import { DEFAULT_HEIGHT, DEFAULT_WIDTH, KEPPEL_GREEN_FILL } from '../../constants/constants';
2-
import { IconProps } from '../types';
2+
import { CustomIconProps } from '../types';
33

44
export const WorkspaceIcon = ({
55
width = DEFAULT_WIDTH,
66
height = DEFAULT_HEIGHT,
7+
secondaryFill = KEPPEL_GREEN_FILL,
8+
opacity = 0.8,
79
...props
8-
}: IconProps): JSX.Element => {
10+
}: CustomIconProps): JSX.Element => {
911
return (
1012
<svg
1113
xmlns="http://www.w3.org/2000/svg"
@@ -19,8 +21,9 @@ export const WorkspaceIcon = ({
1921
fill={props.fill}
2022
/>
2123
<path
24+
opacity={opacity}
2225
d="M2.25 1.625C1.65326 1.625 1.08097 1.86205 0.65901 2.28401C0.237053 2.70597 0 3.27826 0 3.875L0 14.5625C0 15.0101 0.17779 15.4393 0.494257 15.7557C0.810725 16.0722 1.23995 16.25 1.6875 16.25H2.42213C2.65735 15.4233 3.0662 14.6562 3.62138 14H1.125V3.875C1.125 3.57663 1.24353 3.29048 1.4545 3.0795C1.66548 2.86853 1.95163 2.75 2.25 2.75H15.75C16.0484 2.75 16.3345 2.86853 16.5455 3.0795C16.7565 3.29048 16.875 3.57663 16.875 3.875V14H14.3786C15.0019 14.7358 15.3799 15.5446 15.5779 16.25H16.3125C16.7601 16.25 17.1893 16.0722 17.5057 15.7557C17.8222 15.4393 18 15.0101 18 14.5625V3.875C18 3.27826 17.7629 2.70597 17.341 2.28401C16.919 1.86205 16.3467 1.625 15.75 1.625H2.25Z"
23-
fill={KEPPEL_GREEN_FILL || props.fill}
26+
fill={secondaryFill || KEPPEL_GREEN_FILL || props.fill}
2427
/>
2528
</svg>
2629
);

0 commit comments

Comments
 (0)