#

all-props

Complete Kbd
// src/app/piying/page/component/non-field-control/kbd/example/all-props/content.ts
import * as v from 'valibot';
import { actions, NFCSchema } from '@piying/view-angular-core';
import { safeDefine } from '@@piying-define';
export default v.pipe(
  v.tuple([
    v.pipe(
      NFCSchema,
      safeDefine.setComponent('kbd', (actions) => {
        return [
          actions.inputs.patch({
            size: 'lg',
            content: 'Complete Kbd',
          }),
        ];
      }),
    ),
  ]),
  actions.wrappers.patch(['div']),
  actions.class.top('flex gap-4'),
);
content_copy
#

base

Ctrl
// src/app/piying/page/component/non-field-control/kbd/example/base/content.ts
import * as v from 'valibot';
import { actions, NFCSchema } from '@piying/view-angular-core';
import { safeDefine } from '@@piying-define';
export default v.pipe(
  v.tuple([
    v.pipe(
      NFCSchema,
      safeDefine.setComponent('kbd', (actions) => {
        return [actions.inputs.patch({ content: 'Ctrl' })];
      }),
    ),
  ]),
  actions.wrappers.patch(['div']),
  actions.class.top('flex gap-4'),
);
content_copy
#

size

AltShiftTabEnter
// src/app/piying/page/component/non-field-control/kbd/example/size/content.ts
import * as v from 'valibot';
import { actions, NFCSchema } from '@piying/view-angular-core';
import { safeDefine } from '@@piying-define';
export default v.pipe(
  v.tuple([
    v.pipe(
      NFCSchema,
      safeDefine.setComponent('kbd', (actions) => {
        return [actions.inputs.patch({ size: 'xs', content: 'Alt' })];
      }),
    ),
    v.pipe(
      NFCSchema,
      safeDefine.setComponent('kbd', (actions) => {
        return [actions.inputs.patch({ size: 'sm', content: 'Shift' })];
      }),
    ),
    v.pipe(
      NFCSchema,
      safeDefine.setComponent('kbd', (actions) => {
        return [actions.inputs.patch({ size: 'md', content: 'Tab' })];
      }),
    ),
    v.pipe(
      NFCSchema,
      safeDefine.setComponent('kbd', (actions) => {
        return [actions.inputs.patch({ size: 'lg', content: 'Enter' })];
      }),
    ),
  ]),
  actions.wrappers.patch(['div']),
  actions.class.top('flex gap-4 flex-wrap'),
);
content_copy