Skip to content

Commit

Permalink
feat(skeleton): updated default theme, click theme (#549)
Browse files Browse the repository at this point in the history
  • Loading branch information
SiebenSieben committed Mar 10, 2021
1 parent e8f076f commit 9bf9259
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
7 changes: 6 additions & 1 deletion packages/skeleton/src/Component.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ import { Typography } from '../../typography/src';
import styles from './stories.module.css';


<Meta title='Компоненты' component={Skeleton} />
<Meta
title='Компоненты'
component={Skeleton}
parameters={{ 'theme-switcher': { themes: ['click'] } }}
/>


<!-- Canvas -->
Expand Down Expand Up @@ -42,6 +46,7 @@ import styles from './stories.module.css';
version={version}
package='@alfalab/core-components-skeleton'
stage={2}
design='https://www.figma.com/file/hqSP3L6qu8UcL3sf18Su1M/Web-Components?node-id=13404%3A5'
/>

```tsx
Expand Down
11 changes: 8 additions & 3 deletions packages/skeleton/src/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@

:root {
--skeleton-background-filter: none;
--skeleton-default-color: var(--color-light-graphic-neutral);
--skeleton-default-color: var(--color-light-specialbg-component);
--skeleton-border-radius: 8px;
}

.component {
position: relative;
display: inline-block;
border-radius: 4px;
color: transparent;
border-radius: var(--skeleton-border-radius);
overflow: hidden;

/* Safari overflow fix https://gist.github.com/ayamflow/b602ab436ac9f05660d9c15190f4fd7b */
-webkit-mask-image: -webkit-radial-gradient(white, black);
}

.component > * {
Expand Down Expand Up @@ -43,7 +48,7 @@
to left,
rgba(0, 0, 0, 0),
rgba(0, 0, 0, 0) 40%,
rgba(0, 0, 0, 0.025) 50%,
rgba(0, 0, 0, 0.05) 50%,
rgba(0, 0, 0, 0) 60%,
rgba(0, 0, 0, 0)
);
Expand Down
2 changes: 2 additions & 0 deletions packages/themes/src/mixins/click.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
@import './calendar-input/click.css';
@import './toast-plate/click.css';
@import './list/click.css';
@import './skeleton/click.css';

@define-mixin theme-click {
--disabled-cursor: not-allowed;
Expand All @@ -37,4 +38,5 @@
@mixin calendar-input-click;
@mixin toast-plate-click;
@mixin list-click;
@mixin skeleton-click;
}
10 changes: 10 additions & 0 deletions packages/themes/src/mixins/skeleton/click.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@import '../../../../vars/src/index.css';

@define-mixin skeleton-click {
/* core vars */
--color-light-graphic-neutral: #dbdee1;

/* theme */
--skeleton-default-color: var(--color-light-graphic-neutral);
--skeleton-border-radius: 4px;
}

0 comments on commit 9bf9259

Please sign in to comment.