Skip to content

Commit

Permalink
Merge pull request #720 from onewelcome/UC-42
Browse files Browse the repository at this point in the history
UC-42 Add new Icons for zooming action
  • Loading branch information
MichalGorskiOnegini authored Jul 16, 2024
2 parents 955c3e0 + 1577ae9 commit 976e33d
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 4 deletions.
9 changes: 8 additions & 1 deletion src/components/Icon/Icon.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,15 @@
content: "\e94b";
@include fontProperties();
}

.icon-add-circle:before {
content: "\e94c";
@include fontProperties();
}
.icon-zoom-in:before {
content: "\e94e";
@include fontProperties();
}
.icon-zoom-out:before {
content: "\e94d";
@include fontProperties();
}
4 changes: 3 additions & 1 deletion src/components/Icon/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ export enum Icons {
RetryFile = "retry",
AbortFile = "cancel",
FileAltIcon = "file-alt",
AddCircle = "add-circle"
AddCircle = "add-circle",
ZoomIn = "zoom-in",
ZoomOut = "zoom-out"
}

type Tag = "span" | "div" | "i";
Expand Down
Binary file modified src/font/icomoon.eot
Binary file not shown.
2 changes: 2 additions & 0 deletions src/font/icomoon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/font/icomoon.ttf
Binary file not shown.
Binary file modified src/font/icomoon.woff
Binary file not shown.
2 changes: 1 addition & 1 deletion src/font/selection.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion stories/Icon/Icon.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import IconStories from "./Icon.stories";
<Title />
<Subtitle />

The Icon component is used in order to display all of the icons from the OneWelcome design. If you miss a specific icon please contact the `SASSy` team. The way the `<Icon />` component works is by providing a prop called `icon`, which accepts the icon's name. We have created an `enum` within the `<Icon />` component that you can import in your React Component to get autocompletion. Consider the following import example:
The Icon component is used in order to display all the icons from the OneWelcome design. If you miss a specific icon please contact the `SASSy` team. The way the `<Icon />` component works is by providing a prop called `icon`, which accepts the icon's name. We have created an `enum` within the `<Icon />` component that you can import in your React Component to get autocompletion. Consider the following import example:

```
import { Icon, Icons } from '@onewelcome/react-lib-components';
Expand Down
5 changes: 5 additions & 0 deletions stories/Icon/Icon.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import React from "react";
import { Meta, StoryFn } from "@storybook/react";
import { Icon as IconComponent, Icons, Props } from "../../src/components/Icon/Icon";
import IconDocumentation from "./Icon.mdx";
import { IconGrid } from "./IconGrid";

const meta: Meta = {
title: "components/Data Display/Icon",
Expand All @@ -38,6 +39,7 @@ const meta: Meta = {
export default meta;

const Template: StoryFn<Props> = args => <IconComponent {...args} />;
const IconGridTemplate: StoryFn<Props> = args => <IconGrid />;

export const Icon = Template.bind({});

Expand All @@ -54,7 +56,10 @@ IconColor.args = {
};

export const IconSize = Template.bind({});

IconSize.args = {
icon: Icons.Calendar,
size: "3rem"
};

export const IconStates = IconGridTemplate.bind({});

0 comments on commit 976e33d

Please sign in to comment.