Skip to content

Commit

Permalink
fix: rename pakhage
Browse files Browse the repository at this point in the history
  • Loading branch information
amir78729 committed Aug 4, 2024
1 parent 6dde2ee commit 7808fbe
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<img src="https://github.com/user-attachments/assets/109edb2d-a05b-4063-9c84-2d42c3951666" alt="schema builder logo, a combination of S and B characters in a blue palette" height="100px" />

[![npm](https://img.shields.io/npm/v/schemabuilder)](https://www.npmjs.com/package/schemaBuilder)
[![npm](https://img.shields.io/npm/v/schema-saz)](https://www.npmjs.com/package/schema-saz)


# Schema Builder
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "schemabuilder",
"name": "schema-saz",
"version": "0.0.0",
"description": "A Simple User Interface for creating JSON Schema without writing JSON!",
"main": "dist/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type SchemaBuilderProps = {
hideFormTab?: boolean;
};

const SchemaBuilder = ({ onChange, hideSchemaTab = false, hideFormTab = false }: SchemaBuilderProps) => {
const SchemaSaz = ({ onChange, hideSchemaTab = false, hideFormTab = false }: SchemaBuilderProps) => {
const { schema } = useSchema();
const [highlightedSchema, setHighlightedSchema] = useState<string>('');
const [tab, setTab] = useState<number>(0);
Expand Down Expand Up @@ -61,4 +61,4 @@ const SchemaBuilder = ({ onChange, hideSchemaTab = false, hideFormTab = false }:
);
};

export default SchemaBuilder;
export default SchemaSaz;
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import SchemaBuilder from './components/SchemaBuilder';
export default SchemaBuilder;
import SchemaSaz from './components/SchemaSaz';
export default SchemaSaz;

export * from './types';
export { useSchema, SchemaProvider } from './providers/SchemaProvider';
16 changes: 8 additions & 8 deletions src/stories/SchemaBuilder.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// @ts-nocheck
import React, { useState } from 'react';
import { Meta, Story } from '@storybook/react';
import SchemaBuilder from '../components/SchemaBuilder';
import SchemaSaz from '../components/SchemaSaz';
import { STRING_WIDGETS } from '../constants';
import { SchemaProvider } from '../providers/SchemaProvider';
import { createTheme, ThemeProvider } from '@mui/material';
Expand Down Expand Up @@ -98,9 +98,9 @@ const sampleSchema: RJSFSchema = {
additionalProperties: false,
};

const meta: Meta<typeof SchemaBuilder> = {
const meta: Meta<typeof SchemaSaz> = {
title: 'Schema Builder',
component: SchemaBuilder,
component: SchemaSaz,
argTypes: {
hideSchemaTab: {
control: 'boolean',
Expand All @@ -115,7 +115,7 @@ const meta: Meta<typeof SchemaBuilder> = {

const PrimitivesTemplate: Story = (args) => (
<SchemaProvider extraFields={args.extraFields || []}>
<SchemaBuilder {...args} />
<SchemaSaz {...args} />
</SchemaProvider>
);

Expand All @@ -129,7 +129,7 @@ Formats.args = {

const DefaultValueTemplate: Story = (args) => (
<SchemaProvider value={sampleSchema} extraFields={args.extraFields || []}>
<SchemaBuilder {...args} />
<SchemaSaz {...args} />
</SchemaProvider>
);

Expand All @@ -143,7 +143,7 @@ const ThemedTemplate: Story = (args) => {
return (
<ThemeProvider theme={theme}>
<SchemaProvider value={sampleSchema} extraFields={args.extraFields || []}>
<SchemaBuilder {...args} />
<SchemaSaz {...args} />
</SchemaProvider>
</ThemeProvider>
);
Expand Down Expand Up @@ -196,7 +196,7 @@ const customTemplate = {

const FaqTemplate: Story = (args) => (
<SchemaProvider templates={[customTemplate]}>
<SchemaBuilder {...args} />
<SchemaSaz {...args} />
</SchemaProvider>
);
export const CustomTemplate = FaqTemplate.bind({});
Expand All @@ -210,7 +210,7 @@ const ControlledTemplate: Story = (args) => {
<pre>{JSON.stringify(schema, null, 2)}</pre>
</div>
<SchemaProvider>
<SchemaBuilder onChange={(updatedSchema) => setSchema(updatedSchema)} {...args} />
<SchemaSaz onChange={(updatedSchema) => setSchema(updatedSchema)} {...args} />
</SchemaProvider>
</>
);
Expand Down

0 comments on commit 7808fbe

Please sign in to comment.