Browse Source

style: update mentions

feat-css-var
tangjinzhou 3 years ago
parent
commit
c341258241
  1. 2
      components/mentions/index.en-US.md
  2. 4
      components/mentions/index.tsx
  3. 2
      components/mentions/style/index.less
  4. 0
      components/mentions/style/index.tsx

2
components/mentions/index.en-US.md

@ -9,7 +9,7 @@ Mention component.
## When To Use
- When need to mention someone or something.
When you need to mention someone or something.
## API

4
components/mentions/index.tsx

@ -29,8 +29,8 @@ interface MentionsEntity {
export type MentionPlacement = 'top' | 'bottom';
const getMentions = (value = '', config: MentionsConfig): MentionsEntity[] => {
const { prefix = '@', split = ' ' } = config || {};
const getMentions = (value = '', config: MentionsConfig = {}): MentionsEntity[] => {
const { prefix = '@', split = ' ' } = config;
const prefixList: string[] = Array.isArray(prefix) ? prefix : [prefix];
return value

2
components/mentions/style/index.less

@ -37,6 +37,7 @@
overflow: inherit;
overflow-x: hidden;
overflow-y: auto;
/* stylelint-disable declaration-block-no-redundant-longhand-properties */
font-weight: inherit;
font-size: inherit;
font-family: inherit;
@ -45,6 +46,7 @@
font-size-adjust: inherit;
font-stretch: inherit;
line-height: inherit;
/* stylelint-enable declaration-block-no-redundant-longhand-properties */
direction: inherit;
letter-spacing: inherit;
white-space: inherit;

0
components/mentions/style/index.ts → components/mentions/style/index.tsx

Loading…
Cancel
Save