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

[v15] Web: Guess more application icons #44568

Merged
merged 2 commits into from
Jul 23, 2024
Merged
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
54 changes: 42 additions & 12 deletions web/packages/design/src/ResourceIcon/ResourceIcon.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,55 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';
import React, { PropsWithChildren } from 'react';
import { useTheme } from 'styled-components';

import { ResourceIcon, iconNames } from 'design/ResourceIcon';
import { Flex } from 'design';
import { ResourceIcon } from 'design/ResourceIcon';
import { Flex, Text } from 'design';

import { iconNames } from './resourceIconSpecs';

export default {
title: 'Design/ResourceIcon',
};

export const Icons = () => {
return (
<>
{iconNames.map(name => (
<Flex gap={3} alignItems="center">
<ResourceIcon name={name} width="100px" />{' '}
<ResourceIcon name={name} width="25px" />
{name}
</Flex>
))}
</>
<Flex flexWrap="wrap">
{iconNames.map(icon => {
return (
<IconBox text={icon} key={icon}>
<ResourceIcon name={icon} width="100px" />
<ResourceIcon name={icon} width="25px" />
</IconBox>
);
})}
</Flex>
);
};

const IconBox: React.FC<PropsWithChildren<{ text: string }>> = ({
children,
text,
}) => {
const theme = useTheme();

return (
<Flex
width="150px"
height="150px"
alignItems="center"
justifyContent="center"
bg={theme.colors.spotBackground[0]}
flexDirection="column"
m={1}
>
<Flex justifyContent="center" p={2} gap={2}>
{children}
</Flex>
<Text typography="paragraph2" mt={2}>
{text}
</Text>
</Flex>
);
};
9 changes: 9 additions & 0 deletions web/packages/design/src/ResourceIcon/assets/activemq.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions web/packages/design/src/ResourceIcon/assets/adobe.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions web/packages/design/src/ResourceIcon/assets/adobemarketo.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 web/packages/design/src/ResourceIcon/assets/airbase.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions web/packages/design/src/ResourceIcon/assets/airtable.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions web/packages/design/src/ResourceIcon/assets/algolia-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions web/packages/design/src/ResourceIcon/assets/algolia-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions web/packages/design/src/ResourceIcon/assets/anthem.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading