File tree 6 files changed +57
-8
lines changed
6 files changed +57
-8
lines changed Original file line number Diff line number Diff line change 1
- $block-class : ' crossword-preview ' ;
1
+ @use ' ../../styles/_variables ' as * ;
2
2
3
- $base-preview-box-size : 8px ;
4
- // the base size of a box times the base number of boxes
5
- // plus one for the extra margin
6
- $preview-size : $base-preview-box-size * 15 + 1 ;
7
- $preview-margin : 20px ;
8
- $preview-space : $preview-size + $preview-margin * 2 ;
3
+ $block-class : ' crossword-preview' ;
9
4
10
5
@at-root {
11
6
.#{$block-class } {
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ export const Header = () => {
98
98
99
99
const handleLogout = useCallback ( ( ) => {
100
100
auth . signOut ( ) ;
101
- } , [ ] ) ;
101
+ } , [ auth ] ) ;
102
102
103
103
return (
104
104
< HeaderPresentation
Original file line number Diff line number Diff line change
1
+ import type { Meta , StoryObj } from "@storybook/react" ;
2
+
3
+ import { UserSection } from "." ;
4
+
5
+ const meta = {
6
+ title : "Example/User/UserSection" ,
7
+ component : UserSection ,
8
+ parameters : {
9
+ layout : "centered" ,
10
+ } ,
11
+ tags : [ "autodocs" ] ,
12
+ argTypes : { } ,
13
+ } satisfies Meta < typeof UserSection > ;
14
+
15
+ export default meta ;
16
+ type Story = StoryObj < typeof meta > ;
17
+
18
+ // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
19
+ export const Basic : Story = {
20
+ args : {
21
+ children : "section content" ,
22
+ } ,
23
+ } ;
Original file line number Diff line number Diff line change
1
+ import React from "react" ;
2
+
3
+ import { block } from "../../../styles" ;
4
+
5
+ import "./user-section.scss" ;
6
+
7
+ const bem = block ( "user-section" ) ;
8
+
9
+ export const UserSection : React . FC < { children : React . ReactNode } > = ( {
10
+ children,
11
+ } ) => < div className = { bem ( ) } > { children } </ div > ;
Original file line number Diff line number Diff line change
1
+ @use ' ../../../styles/_variables' as * ;
2
+
3
+ $block-class : ' user-section' ;
4
+
5
+ $number-of-previews : 4 ;
6
+
7
+ @at-root {
8
+ .#{$block-class } {
9
+ max-width : $preview-space * $number-of-previews ;
10
+ margin-left : auto ;
11
+ margin-right : auto ;
12
+ margin-bottom : 20px ;
13
+ }
14
+ }
Original file line number Diff line number Diff line change
1
+ $base-preview-box-size : 8px ;
2
+ // the base size of a box times the base number of boxes
3
+ // plus one for the extra margin
4
+ $preview-size : $base-preview-box-size * 15 + 1 ;
5
+ $preview-margin : 20px ;
6
+ $preview-space : $preview-size + $preview-margin * 2 ;
You can’t perform that action at this time.
0 commit comments