0.0.23 • Published 7 months ago

@stcland/components v0.0.23

Weekly downloads
-
License
-
Repository
-
Last release
7 months ago

STC Component Library

The @stcland/components package is structured in a modular way, allowing for both normal components and Higher-Order Components (HOCs) with styled support. Below is an overview of the file system structure and an explanation of each important part:

Component Export Patterns

  • Regular Components: Exported from index.ts for general use across applications without additional HOC wrappers.

  • HOC Components: Exported from withStyles/index.ts to allow users to access styled versions of the core components. These components enhance the base functionality with added styling.

Note: make sure to create nested withStyles exports under each new component scope, for easier search.

Example Usage

Here’s how you might import and use these components:

// Importing a regular X component
import { XComponent } from '@stcland/components'

// Importing a styled version of the X component
import { XComponent  } from '@stcland/components/withStyles'

// Use the `StclandStyles` type to add your layer of customStyles for all the component library.
import { customStyles } from 'src/styles/example.stc.config.ts'

// ALL components exported from the withStyles module should be wrapped in a StcStylesProvider.
<StcStylesProvider customStyles={customStyles}>
  <XComponent />  {/* No need to pass customStyles to the HOCs */}
</StcStylesProvider>
0.0.20

9 months ago

0.0.21

9 months ago

0.0.10

11 months ago

0.0.22

8 months ago

0.0.11

11 months ago

0.0.23

7 months ago

0.0.12

11 months ago

0.0.13

10 months ago

0.0.14

10 months ago

0.0.15

10 months ago

0.0.9

11 months ago

0.0.16

10 months ago

0.0.8

11 months ago

0.0.17

10 months ago

0.0.18

10 months ago

0.0.19

9 months ago

0.0.7

11 months ago

0.0.6

11 months ago

0.0.5

12 months ago

0.0.4

12 months ago

0.0.3

1 year ago