New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@yozora/react-admonition

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yozora/react-admonition

render markdown admonition in react

latest
Source
npmnpm
Version
3.0.0-alpha.13
Version published
Maintainers
1
Created
Source

@yozora/react-admonition


This component is for rendering the Admonition data produced by @yozora/tokenizer-admonition.
This component has been built into @yozora/react-markdown, you can use it directly.

yozora-admonition.png

Install

  • npm

    npm install --save @yozora/react-admonition
    
  • yarn

    yarn add @yozora/react-admonition
    

Usage

  • Basic:

    import React from 'react'
    import Admonition from '@yozora/react-admonition'
    
    const wrapper = (
      <Admonition
        keyword="info"
        style={{ color: 'orange', fontSize: '16px' }}
        title={<span>a<strong>b</strong></span>}
      >
        some text1
        <span>some text2</span>
      </Admonition>
    )
    

Props

NameTypeRequiredDefaultDescription
childrenReact.ReactNodefalse-Admonition contents
classNamestringfalse-Root css class
keywordstringfalse-Admonition keyword
titlestringfalse-Admonition title
styleReact.CSSPropertiesfalse-Root css style
iconReact.ReactNodefalse-Admonition title icon
  • className: The root element of this component will always bind with the CSS class 'yozora-admonition'

  • keyword

    Raw KeywordResolved Keyword
    note
    defaultnote
    notenote
    importinfo
    infoinfo
    successtip
    tiptip
    warningcaution
    cautioncaution
    errorerror
    dangerdanger

CSS variables

NameDefault value
--yozora-admonition-border-width5px
--yozora-colors-background-error#ffebec
--yozora-colors-background-info#eef9fd
--yozora-colors-background-note#fdfdfe
--yozora-colors-background-success#e6f6e6
--yozora-colors-background-warning#fff8e6
--yozora-colors-border-error#e13238
--yozora-colors-border-info#4cb3d4
--yozora-colors-border-note#d4d5d8
--yozora-colors-border-success#009400
--yozora-colors-border-warning#e6a700

Keywords

mdast node renderer

FAQs

Package last updated on 27 Aug 2025

Did you know?

Socket

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.

Install

Related posts