
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
@heights/heights-ui
Advanced tools
import { theme } from '@heights/heights-ui'
import {
AppLink,
ButtonDown,
Carousel,
CommunityTake,
ContentHighlight,
Experts,
Hero,
FeatureCard,
Features,
Footer,
IconLink,
IconPicker,
Nav,
SmartCard,
SocialLinks,
SubscribeForm,
} from '@heights/heights-ui'
Source files are located in the
src/components
directory.
import { Logo } from '@heights/heights-ui'
Source files are located in the
src/icons
directory.
import { bgColourPicker, BackgroundColours } from '@heights/heights-ui'
Source files are located in the
src/icons
directory.
The theme can be imported like so:
import { theme } from '@heights/heights-ui'
Source files are located in the
src/theme
directory.
The package is heavily reliant on Theme UI. Many of the components and styles need Theme UI in order to work.
Theme UI provides a constraint-based approach to component creation and theming. This allows you and your team to create a design system that supports the widest
To fully understand Theme UI and all that it provides, please read and understand the documentation at https://theme-ui.com/getting-started.
The theme matches Theme UI's specifications, so includes all the colour, font, sizing and spacing information that your app should need.
All theme-related files are located in the src/theme
directory.
Add the theme to your application with the ThemeProvider
, passing in the theme object as a prop.
import React from 'react'
import { ThemeProvider } from 'theme-ui'
import { theme } from '@heights/heights-ui'
export default (props) => (
<ThemeProvider theme={theme}>{props.children}</ThemeProvider>
)
This is an example of how a new component could be created without using Emotion's styled.div
syntax. Read more about this method in the Theme UI docs.
/** @jsx jsx */
import { jsx } from 'theme-ui'
import { FunctionComponent } from 'react'
export const Title: FunctionComponent = ({ children }) => (
<h1
sx={{
color: 'primary',
fontFamily: 'heading',
}}
>
{children}
</h1>
)
Theme UI includes pre-built UI components to make styling a page with Theme UI more quickly. The theme-ui
package includes components for layouts, grids, buttons, form elements, and more.
import { Box } from 'theme-ui'
export const SomeComponent = (
<Box
sx={{
color: 'white',
bg; 'primary',
p: 4,
}}
>
Beep
</Box>
)
Find out more in the Theme UI component docs.
Test files use *.test.ts(x)
or *.spec.ts(x)
Any file with *.story.tsx
or *.stories.tsx
, or *.story.mdx
or *.stories.mdx
can be used by Storybook. The *.mdx
extensions are used for documentation.
E.g. a Button
found in the /src/components
directory.
// src/components/button
.
├── Button.tsx // < component code
├── README.md // < component documentation
├── Button.story.tsx // < component story
├── Button.test.tsx // < component tests
├── Button.models.ts // < component tests
├── __snapshots__ // < auto-generated snapshot files
└── index.ts // < component entry file
The package uses Preconstruct to bundle all its source code. Please consult their docs if you need to update/improve the build process.
yarn build
: Compile a production buildyarn build:dev
: Compile a development buildyarn storybook
: Run Storybook development environmentyarn format
: Format all JS with Prettieryarn lint
: Lint JSyarn size
: Test the file size of the buildyarn test
: Run all testsyarn test:js
: Run all JS tests with Jestyarn test:coverage
: Run a code coverage test with Jestyarn test:watch
: Run test suite while watching for changesyarn release
: Publish a new package version to npmThe design system uses various tools to ensure better code quality. Defaults have been set for linting and code style, but can easily be overridden according to your needs.
All git commits and pull request titles should follow the Conventional Commits method. This will allow our release script to correctly bump the package version number appropriately.
Running npm run release
while on an up-to-date and clean master
branch will update the GitHub release and publish to npm.
FAQs
Design system for Heights
The npm package @heights/heights-ui receives a total of 0 weekly downloads. As such, @heights/heights-ui popularity was classified as not popular.
We found that @heights/heights-ui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.