Skip to content

Commit

Permalink
Update folder structure for illustrations, make illustrations take al…
Browse files Browse the repository at this point in the history
…l the available space
  • Loading branch information
cgero-eth committed Sep 20, 2023
1 parent 4b22476 commit bc4ee6f
Show file tree
Hide file tree
Showing 14 changed files with 213 additions and 213 deletions.
148 changes: 0 additions & 148 deletions src/components/illustrationHuman/illustrationHumanList.ts

This file was deleted.

53 changes: 0 additions & 53 deletions src/components/illustrationObject/illustrationObjectList.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
import { IllustrationHuman } from './illustrationHuman';

const meta: Meta<typeof IllustrationHuman> = {
title: 'components/IllustrationHuman',
title: 'components/Illustrations/IllustrationHuman',
component: IllustrationHuman,
tags: ['autodocs'],
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ export interface IIllustrationHumanProps extends HTMLAttributes<HTMLDivElement>
accessory?: IllustrationHumanAccessory;
}

const illustrationHumanSize = 360;

export const IllustrationHuman: React.FC<IIllustrationHumanProps> = (props) => {
const { body, expression, hairs, sunglasses, accessory, className, style, ...otherProps } = props;

Expand All @@ -50,12 +48,12 @@ export const IllustrationHuman: React.FC<IIllustrationHumanProps> = (props) => {
const Sunglasses = sunglasses ? illustrationHumanSunglassesList[sunglasses] : undefined;
const Accessory = accessory ? illustrationHumanAccessoryList[accessory] : undefined;

const computedStyle = { width: illustrationHumanSize, height: illustrationHumanSize, ...style };
const commonProps = { width: illustrationHumanSize, height: illustrationHumanSize, className: 'absolute' };
const computedStyle = { width: '100%', height: '100%', ...style };
const commonProps = { className: 'absolute top-0 right-0' };

return (
<div className={classNames('relative', className)} style={computedStyle} {...otherProps}>
<Body {...commonProps} />
<Body />
<Expression {...commonProps} />
{Hairs && <Hairs {...commonProps} />}
{Sunglasses && <Sunglasses {...commonProps} />}
Expand Down
Loading

0 comments on commit bc4ee6f

Please sign in to comment.