File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- $block-class : ' crossword-preview ' ;
1+ @use ' ../../styles/_variables ' as * ;
22
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' ;
94
105@at-root {
116 .#{$block-class } {
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ export const Header = () => {
9898
9999 const handleLogout = useCallback ( ( ) => {
100100 auth . signOut ( ) ;
101- } , [ ] ) ;
101+ } , [ auth ] ) ;
102102
103103 return (
104104 < 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