Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/schemesonic/whats-new
What's New component for react
https://github.com/schemesonic/whats-new
announcement logs preview react typescript whats-new
Last synced: 30 days ago
JSON representation
What's New component for react
- Host: GitHub
- URL: https://github.com/schemesonic/whats-new
- Owner: SchemeSonic
- License: mit
- Created: 2022-04-09T17:34:36.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-04-17T15:13:06.000Z (over 2 years ago)
- Last Synced: 2024-10-14T07:11:14.582Z (2 months ago)
- Topics: announcement, logs, preview, react, typescript, whats-new
- Language: TypeScript
- Homepage: https://react-whats-new.netlify.app
- Size: 1.06 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# What's New component for react
> Show new features
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/paraboly/react-apexcharts-dynamic-config/graphs/commit-activity)
[![NPM](https://img.shields.io/npm/v/@schemesonic/whats-new.svg)](https://www.npmjs.com/package/@schemesonic/whats-new) [![Netlify Status](https://api.netlify.com/api/v1/badges/ed06153b-5f15-4305-b897-22ed648b95ae/deploy-status)](https://app.netlify.com/sites/react-whats-new/deploys)
[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/Naereen/StrapDown.js/blob/master/LICENSE)## Demo
| Announcements | Announcement Details |
| ---------------------------------------------------------------------------- | :-----------------------------------------------------------------------------: |
| | |> https://react-whats-new.netlify.app
---
## Install
```bash
npm install --save @schemesonic/whats-new
```---
## Usage
```tsx
import React, { useRef } from 'react';
import { Badge, Button } from '@material-ui/core';
import { WhatsNew, WhatsNewService } from '@schemesonic/whats-new';const WhatsNewExample = (): JSX.Element => {
const WhatsNewRef = useRef();
const [unreadCount, setUnreadCount] = React.useState(
WhatsNewService.getUnreadCount(announcements)
);
const announcements = [
{
title: "NEW ABILITY WORD: COVEN",
date: new Date("2022-04-09"),
version: 'v1.1.0',
tags: [{
text: 'New Feature',
color: 'rgba(0, 0, 0, 0.87)',
backgroundColor: '#99d066',
}],
overview: `### This is overview`,
content: `### This is content`
}
];return
;
{
WhatsNewRef.current?.togglePanel();
setUnreadCount(WhatsNewService.getUnreadCount(announcements));
}}
>
Show Announcements
};export default WhatsNewExample;
```## Details
| Props | Definition | Type | Default | Required |
| -------- | :-----------------------: | ---------------------------: | ------: | -------: |
| prop | Example prop | `Prop` | null | true |
| onChange | Example callback function | `(updatedOpt: Prop) => void` | null | true |---
## Licence
[MIT](./LICENSE) License © [SchemeSonic](https://github.com/jaredpalmer/tsdx)