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

Add directory icons: outline, filled, open and closed #142

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/radix-icons/icons/directory-filled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/radix-icons/icons/directory-open-filled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/radix-icons/icons/directory-open.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/radix-icons/icons/directory.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions packages/radix-icons/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@
"dashboard": "icons/15/dashboard.svg",
"desktop": "icons/15/desktop.svg",
"dimensions": "icons/15/dimensions.svg",
"directory": "icons/15/directory.svg",
"directory-filled": "icons/15/directory-filled.svg",
"directory-open-filled": "icons/15/directory-open-filled.svg",
"directory-open": "icons/15/directory-open.svg",
"disc": "icons/15/disc.svg",
"discord-logo": "icons/15/discord-logo.svg",
"divider-horizontal": "icons/15/divider-horizontal.svg",
Expand Down
28 changes: 28 additions & 0 deletions packages/radix-icons/src/DirectoryFilledIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import * as React from 'react';
import { IconProps } from './types';

// ✅
export const DirectoryFilledIcon = React.forwardRef<SVGSVGElement, IconProps>(
({ color = 'currentColor', ...props }, forwardedRef) => {
return (
<svg
width="15"
height="15"
viewBox="0 0 15 15"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}
ref={forwardedRef}
>
<path
d="M1 11.5C1 12.3284 1.67157 13 2.5 13H12.5C13.3284 13 14 12.3284 14 11.5V5C14 4.17157 13.3284 3.5 12.5 3.5H9.5H7.83333C7.72515 3.5 7.61988 3.46491 7.53333 3.4L5.86667 2.15C5.73684 2.05263 5.57894 2 5.41667 2H2.5C1.67157 2 1 2.67157 1 3.5L1 6.5L1 11.5Z"
fill={color}
fillRule="evenodd"
clipRule="evenodd"
/>
</svg>
);
}
);

export default DirectoryFilledIcon;
28 changes: 28 additions & 0 deletions packages/radix-icons/src/DirectoryIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import * as React from 'react';
import { IconProps } from './types';

// ✅
export const DirectoryIcon = React.forwardRef<SVGSVGElement, IconProps>(
({ color = 'currentColor', ...props }, forwardedRef) => {
return (
<svg
width="15"
height="15"
viewBox="0 0 15 15"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}
ref={forwardedRef}
>
<path
d="M2 11.5C2 11.7761 2.22386 12 2.5 12H12.5C12.7761 12 13 11.7761 13 11.5V5C13 4.72386 12.7761 4.5 12.5 4.5H9.5H7.83333C7.50878 4.5 7.19298 4.39473 6.93333 4.2L5.33333 3H2.5C2.22386 3 2 3.22386 2 3.5L2 6.5L2 11.5ZM2.5 13C1.67157 13 1 12.3284 1 11.5L1 6.5L1 3.5C1 2.67157 1.67157 2 2.5 2H5.41667C5.57894 2 5.73684 2.05263 5.86667 2.15L7.53333 3.4C7.61988 3.46491 7.72515 3.5 7.83333 3.5H9.5H12.5C13.3284 3.5 14 4.17157 14 5V11.5C14 12.3284 13.3284 13 12.5 13H2.5Z"
fill={color}
fillRule="evenodd"
clipRule="evenodd"
/>
</svg>
);
}
);

export default DirectoryIcon;
28 changes: 28 additions & 0 deletions packages/radix-icons/src/DirectoryOpenFilledIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import * as React from 'react';
import { IconProps } from './types';

// ✅
export const DirectoryOpenFilledIcon = React.forwardRef<SVGSVGElement, IconProps>(
({ color = 'currentColor', ...props }, forwardedRef) => {
return (
<svg
width="15"
height="15"
viewBox="0 0 15 15"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}
ref={forwardedRef}
>
<path
d="M2.1361 7.14524L2 7.78036L2 6.5L2 3.5C2 3.22386 2.22386 3 2.5 3H5.33333L6.93333 4.2C7.19298 4.39473 7.50878 4.5 7.83333 4.5H9.5H11.5C11.7761 4.5 12 4.72386 12 5L3.80842 5C3.10111 5 2.48991 5.4941 2.34171 6.18571L2.1361 7.14524ZM13 5V5.01844C13.832 5.14952 14.4129 5.95961 14.2297 6.81429L13.1583 11.8143C13.0101 12.5059 12.3989 13 11.6916 13H2.5C1.67157 13 1 12.3284 1 11.5L1 6.5L1 3.5C1 2.67157 1.67157 2 2.5 2H5.41667C5.57894 2 5.73684 2.05263 5.86667 2.15L7.53333 3.4C7.61988 3.46491 7.72515 3.5 7.83333 3.5H9.5H11.5C12.3284 3.5 13 4.17157 13 5Z"
fill={color}
fillRule="evenodd"
clipRule="evenodd"
/>
</svg>
);
}
);

export default DirectoryOpenFilledIcon;
28 changes: 28 additions & 0 deletions packages/radix-icons/src/DirectoryOpenIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import * as React from 'react';
import { IconProps } from './types';

// ✅
export const DirectoryOpenIcon = React.forwardRef<SVGSVGElement, IconProps>(
({ color = 'currentColor', ...props }, forwardedRef) => {
return (
<svg
width="15"
height="15"
viewBox="0 0 15 15"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}
ref={forwardedRef}
>
<path
d="M2.13713 11.844C2.22824 11.9401 2.35712 12 2.5 12H11.6916C11.9274 12 12.1311 11.8353 12.1805 11.6048L13.2519 6.60477C13.3186 6.29351 13.0813 6 12.763 6H12.5L3.80842 6C3.57265 6 3.36892 6.1647 3.31951 6.39524L3.1139 7.35476L2.7389 9.10476L2.3639 10.8548L2.1764 11.7298C2.16774 11.7702 2.15442 11.8084 2.13713 11.844ZM2 7.78036L2.1361 7.14524L2.34171 6.18571C2.48991 5.4941 3.10111 5 3.80842 5L12 5C12 4.72386 11.7761 4.5 11.5 4.5H9.5H7.83333C7.50878 4.5 7.19298 4.39473 6.93333 4.2L5.33333 3H2.5C2.22386 3 2 3.22386 2 3.5L2 6.5L2 7.78036ZM13 5.01844V5C13 4.17157 12.3284 3.5 11.5 3.5H9.5H7.83333C7.72515 3.5 7.61988 3.46491 7.53333 3.4L5.86667 2.15C5.73684 2.05263 5.57894 2 5.41667 2H2.5C1.67157 2 1 2.67157 1 3.5L1 6.5L1 11.5C1 12.3284 1.67157 13 2.5 13H11.6916C12.3989 13 13.0101 12.5059 13.1583 11.8143L14.2297 6.81429C14.4129 5.95961 13.832 5.14952 13 5.01844Z"
fill={color}
fillRule="evenodd"
clipRule="evenodd"
/>
</svg>
);
}
);

export default DirectoryOpenIcon;
4 changes: 4 additions & 0 deletions packages/radix-icons/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ export { default as DashIcon } from './DashIcon';
export { default as DashboardIcon } from './DashboardIcon';
export { default as DesktopIcon } from './DesktopIcon';
export { default as DimensionsIcon } from './DimensionsIcon';
export { default as DirectoryIcon } from './DirectoryIcon';
export { default as DirectoryFilledIcon } from './DirectoryFilledIcon';
export { default as DirectoryOpenFilledIcon } from './DirectoryOpenFilledIcon';
export { default as DirectoryOpenIcon } from './DirectoryOpenIcon';
export { default as DiscIcon } from './DiscIcon';
export { default as DiscordLogoIcon } from './DiscordLogoIcon';
export { default as DividerHorizontalIcon } from './DividerHorizontalIcon';
Expand Down
12 changes: 12 additions & 0 deletions packages/website/components/AllIcons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,18 @@ const Objects = () => {
<CopyButton label="Mixer Vertical">
<Icons.MixerVerticalIcon />
</CopyButton>
<CopyButton label="Directory">
<Icons.DirectoryIcon />
</CopyButton>
<CopyButton label="Directory Filled">
<Icons.DirectoryFilledIcon />
</CopyButton>
<CopyButton label="Directory Open">
<Icons.DirectoryOpenIcon />
</CopyButton>
<CopyButton label="Directory Open Filled">
<Icons.DirectoryOpenFilledIcon />
</CopyButton>
<CopyButton label="File">
<Icons.FileIcon />
</CopyButton>
Expand Down