summaryrefslogtreecommitdiffstats
path: root/src/components/atoms/layout/sidebar.tsx
blob: d86af37ae0156e6bce5069e70281ae1e4d324fb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { FC, ReactNode } from 'react';
import styles from './sidebar.module.scss';

export type SidebarProps = {
  /**
   * An accessible name for the sidebar.
   */
  'aria-label'?: string;
  /**
   * The sidebar body.
   */
  children: ReactNode;
  /**
   * Set additional classnames to the aside element.
   */
  className?: string;
};

/**
 * Sidebar component
 *
 * Render an aside element.
 */
const Sidebar: FC<SidebarProps> = ({ children, className = '', ...props }) => {
  return (
    <aside className={`${styles.wrapper} ${className}`} {...props}>
      <div className={styles.body}>{children}</div>
    </aside>
  );
};

export default Sidebar;
/, lookbehind: true, inside: { annotation: { pattern: /(?:^|[^.])@[\w\.]+/, alias: 'punctuation', }, }, }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: true, greedy: true, }, ], keyword: /\b(?:abstract|break|catch|component|continue|default|do|else|extends|final|finally|for|function|if|in|include|package|private|property|public|remote|required|rethrow|return|static|switch|throw|try|var|while|xml)\b(?!\s*=)/, operator: [ /\+\+|--|&&|\|\||::|=>|[!=]==|<=?|>=?|[-+*/%&|^!=<>]=?|\?(?:\.|:)?|[?:]/, /\b(?:and|contains|eq|equal|eqv|gt|gte|imp|is|lt|lte|mod|not|or|xor)\b/, ], scope: { pattern: /\b(?:application|arguments|cgi|client|cookie|local|session|super|this|variables)\b/, alias: 'global', }, type: { pattern: /\b(?:any|array|binary|boolean|date|guid|numeric|query|string|struct|uuid|void|xml)\b/, alias: 'builtin', }, }); Prism.languages.insertBefore('cfscript', 'keyword', { // This must be declared before keyword because we use "function" inside the lookahead 'function-variable': { pattern: /[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/, alias: 'function', }, }); delete Prism.languages.cfscript['class-name']; Prism.languages.cfc = Prism.languages['cfscript'];