@kuroson/cse-common-website
v0.3.1
Published
Common website components for UNSW CSE courses
Downloads
439
Readme
@kuroson/cse-common-website
Common website React components for UNSW CSE courses.
Installation
npm install @kuroson/cse-common-website
# or
pnpm add @kuroson/cse-common-website
# or
yarn add @kuroson/cse-common-websiteRequirements
- Node.js >= 22
- React >= 19.0.0
- Tailwind CSS >= 4.0.0
Usage
First, import the compiled CSS file in your application:
import "@kuroson/cse-common-website/styles.css";Then use the components:
import { Admonition } from "@kuroson/cse-common-website";
function App() {
return (
<Admonition type="info" title="Note">
This is an informational admonition.
</Admonition>
);
}CSS Import Options
You can import the CSS in several ways:
In your main entry file:
import "@kuroson/cse-common-website/styles.css";In your CSS/SCSS file:
@import "@kuroson/cse-common-website/styles.css";In HTML (if using a bundler that supports it):
<link rel="stylesheet" href="@kuroson/cse-common-website/styles.css" />Components
Admonition
A styled callout component for highlighting important information.
Props:
type: The type of admonition (e.g., 'info', 'warning', 'error', 'tip')title: Optional title for the admonitionchildren: Content to display inside the admonition
License
MIT
