-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(onboarding-ui): Common components (#478)
- Loading branch information
Showing
53 changed files
with
649 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { usePrefersColorScheme } from './usePrefersColorScheme'; | ||
|
||
export const useDarkMode = (forced?: boolean): boolean => { | ||
const systemDarkMode = usePrefersColorScheme('dark'); | ||
|
||
if (forced !== undefined) { | ||
return forced; | ||
} | ||
|
||
return systemDarkMode; | ||
}; |
Binary file modified
BIN
+76 Bytes
(100%)
...elage/.loki/reference/chrome_iphone7_Data_Display_Tooltip_Arrow_Positioning.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2 Bytes
(100%)
...selage/.loki/reference/chrome_laptop_Data_Display_Tooltip_Arrow_Positioning.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions
16
packages/fuselage/src/components/Box/AnimatedVisibility/AnimatedVisibility.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { ReactElement, ReactNode } from 'react'; | ||
|
||
type AnimatedVisibilityProps = { | ||
children: ReactNode; | ||
visibility?: 'hidden' | 'visible' | 'hiding' | 'unhiding'; | ||
}; | ||
|
||
const AnimatedVisibility: { | ||
(props: AnimatedVisibilityProps): ReactElement; | ||
HIDDEN: 'hidden'; | ||
VISIBLE: 'visible'; | ||
HIDING: 'hiding'; | ||
UNHIDING: 'unhiding'; | ||
}; | ||
|
||
export = AnimatedVisibility; |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
packages/fuselage/src/components/Box/AnimatedVisibility/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './AnimatedVisibility'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"rootDir": "./src" | ||
}, | ||
"include": ["./src"], | ||
"exclude": ["./**/*.stories.tsx"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
module.exports = { | ||
extends: '@rocket.chat/eslint-config-alt/typescript', | ||
extends: '@rocket.chat/eslint-config-alt/react', | ||
env: { | ||
jest: true, | ||
}, | ||
rules: { | ||
'react/react-in-jsx-scope': 'off', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"src/**/*.{js,ts,tsx}": [ | ||
"yarn run eslint --fix --" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
current | ||
difference |
Binary file removed
BIN
-3.16 KB
packages/onboarding-ui/.loki/reference/chrome_iphone7_MyComponent_My_Component.png
Binary file not shown.
Binary file removed
BIN
-1.6 KB
packages/onboarding-ui/.loki/reference/chrome_laptop_MyComponent_My_Component.png
Binary file not shown.
Binary file added
BIN
+11 KB
...ages/onboarding-ui/.loki/reference/desktop_common_BackgroundLayer_Dark_Mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.2 KB
...ges/onboarding-ui/.loki/reference/desktop_common_BackgroundLayer_Light_Mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.2 KB
...boarding-ui/.loki/reference/desktop_common_BackgroundLayer_System_Dark_Mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+29.1 KB
.../onboarding-ui/.loki/reference/desktop_common_RocketChatLogo_RocketChatLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+14.3 KB
packages/onboarding-ui/.loki/reference/mobile_common_BackgroundLayer_Dark_Mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+14.6 KB
...ages/onboarding-ui/.loki/reference/mobile_common_BackgroundLayer_Light_Mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+14.6 KB
...nboarding-ui/.loki/reference/mobile_common_BackgroundLayer_System_Dark_Mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11 KB
...s/onboarding-ui/.loki/reference/mobile_common_RocketChatLogo_RocketChatLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.53 KB
packages/onboarding-ui/.loki/reference/tablet_common_BackgroundLayer_Dark_Mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.67 KB
...ages/onboarding-ui/.loki/reference/tablet_common_BackgroundLayer_Light_Mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.67 KB
...nboarding-ui/.loki/reference/tablet_common_BackgroundLayer_System_Dark_Mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+12.2 KB
...s/onboarding-ui/.loki/reference/tablet_common_RocketChatLogo_RocketChatLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import ReactDOM from 'react-dom'; | ||
|
||
import BackgroundLayer from './BackgroundLayer'; | ||
|
||
it('renders without crashing', () => { | ||
const div = document.createElement('div'); | ||
ReactDOM.render(<BackgroundLayer />, div); | ||
ReactDOM.unmountComponentAtNode(div); | ||
}); |
Oops, something went wrong.