react-textgame-components v0.3.2
react-textgame-components
react-textgame-components / Exports
Table of contents
Release notes
Type Aliases
Variables
Functions
- GBlock
- GBlurText
- GButton
- GIcon
- GImage
- GInput
- GLink
- GMap
- GMapHotspot
- GNotificationContainer
- GP
- GProvider
- GSay
- GVideo
- useNotification
Type Aliases
ButtonVariants
Ƭ ButtonVariants: "dark"
| "light"
| "success"
| "warning"
| "danger"
| "info"
Defined in
src/components/GButton/types.ts:16
Effect
Ƭ Effect: "rightSpring"
| "leftSpring"
| "bottomSpring"
| "opacity"
Defined in
src/components/GBlock/types.ts:5
LinkVariants
Ƭ LinkVariants: "default"
| "light"
| "textLike"
Defined in
src/components/GLink/types.ts:4
SaySideVariants
Ƭ SaySideVariants: "left"
| "right"
Defined in
src/components/GSay/types.ts:7
SayVariants
Ƭ SayVariants: "common"
| "bigName"
| "messenger"
Defined in
src/components/GSay/types.ts:5
Variables
GContext
• Const
GContext: Context
\<IGContext
>
Defined in
src/components/GContext/GContext.tsx:5
Functions
GBlock
▸ GBlock(props
): Element
GBlock component is a container for content that can be shown on button click or other event
Parameters
Name | Type | Description |
---|---|---|
props | GBlockProps | GBlockProps |
Returns
Element
GBlock component
Example
<GBlock loadOn="button" buttonName="Show more">
<div>Content</div>
</GBlock>
See
- GBlockProps
- GButton
- useIsShown
- GContext
Defined in
src/components/GBlock/GBlock.tsx:25
GBlurText
▸ GBlurText(«destructured»
): Element
Parameters
Name | Type |
---|---|
«destructured» | GBlurTextProps |
Returns
Element
Defined in
src/components/GBlurText/GBlurText.tsx:5
GButton
▸ GButton(props
): Element
Parameters
Name | Type |
---|---|
props | GButtonProps |
Returns
Element
Defined in
src/components/GButton/GButton.tsx:5
GIcon
▸ GIcon(props
): Element
Parameters
Name | Type |
---|---|
props | IconInterface |
Returns
Element
Defined in
src/components/GIcon/GIcon.tsx:6
GImage
▸ GImage(«destructured»
): Element
Parameters
Name | Type |
---|---|
«destructured» | GameImageProps |
Returns
Element
Defined in
src/components/GImage/GImage.tsx:9
GInput
▸ GInput(props
): Element
Parameters
Name | Type |
---|---|
props | GInputProps |
Returns
Element
Defined in
src/components/GInput/GInput.tsx:11
GLink
▸ GLink(props
): Element
Parameters
Name | Type |
---|---|
props | LinkProps |
Returns
Element
Defined in
src/components/GLink/GLink.tsx:23
GMap
▸ GMap(«destructured»
): Element
Parameters
Name | Type |
---|---|
«destructured» | GMapProps |
Returns
Element
Defined in
src/components/GMap/GMap.tsx:13
GMapHotspot
▸ GMapHotspot\<T
>(props
): GMapHotspotType
Type parameters
Name | Type |
---|---|
T | extends HotspotType |
Parameters
Name | Type |
---|---|
props | GMapHotspotProps \<T > |
Returns
GMapHotspotType
Defined in
src/components/GMap/GMapHotspot.tsx:6
GNotificationContainer
▸ GNotificationContainer(props
): Element
GNotificationContainer component is a container for notifications
DON'T FORGET TO IMPORT CSS FILE IN YOUR APP (react-textgame-components/dist/styles.css)
Parameters
Name | Type | Description |
---|---|---|
props | ToastContainerProps | ToastContainerProps |
Returns
Element
GNotificationContainer component
Example
<GNotificationContainer
position="top-right"
hideProgressBar={true}
theme="dark"
autoClose={5000}
/>
See
- ToastContainerProps
- GContext
- useNotification
- ToastContainer
- https://fkhadra.github.io/react-toastify/introduction/
- https://fkhadra.github.io/react-toastify/api/toastcontainer
Defined in
src/components/GNotification/GNotificationContainer.tsx:29
GP
▸ GP(props
, context?
): ReactNode
game tag
Parameters
Name | Type |
---|---|
props | MUIStyledCommonProps \<Theme > & ClassAttributes \<HTMLParagraphElement > & HTMLAttributes \<HTMLParagraphElement > |
context? | any |
Returns
ReactNode
Defined in
GProvider
▸ GProvider(«destructured»
): Element
Parameters
Name | Type |
---|---|
«destructured» | GProviderProps |
Returns
Element
Defined in
src/components/GContext/GProvider.tsx:11
GSay
▸ GSay(props
): Element
Parameters
Name | Type |
---|---|
props | GSayProps |
Returns
Element
Defined in
src/components/GSay/GSay.tsx:34
GVideo
▸ GVideo(props
): Element
Parameters
Name | Type |
---|---|
props | GVideoProps |
Returns
Element
Defined in
src/components/GVideo/GVideo.tsx:6
useNotification
▸ useNotification(options?
): Object
Hook for showing notifications
DON'T FORGET TO IMPORT CSS FILE IN YOUR APP (react-textgame-components/dist/styles.css)
Parameters
Name | Type | Description |
---|---|---|
options? | ToastOptions \<unknown > | options for the notification |
Returns
Object
notify - function to show a notification
Name | Type |
---|---|
notify | (content : ReactNode ) => void |
Example
const { notify } = useNotification();
notify(<div>Hello, world!</div>);
Example
const { notify } = useNotification({ autoClose: 10000 });
notify('Hello, world!');
See
- https://fkhadra.github.io/react-toastify/introduction/
- https://fkhadra.github.io/react-toastify/api/toast
Defined in
3 months ago
3 months ago
4 months ago
4 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago