Skip to content

Commit

Permalink
Removed: Removed un-wanted console log.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arifulislam5577 committed Dec 24, 2023
1 parent b2b8198 commit de962de
Show file tree
Hide file tree
Showing 24 changed files with 155 additions and 126 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Continuous Integration

on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Fetch all history for all branches and tags
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '20.9.0'

- name: Install dependencies
run: npm install

- name: Run lint
run: npm run lint

- name: Run format check
run: npm run format

- name: Check commit messages
uses: wagoid/commitlint-github-action@v3
with:
configFile: commitlint.config.cjs
21 changes: 21 additions & 0 deletions .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: GitHub Actions Vercel Preview Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
push:
branches-ignore:
- main
jobs:
Deploy-Preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Vercel CLI
run: npm install --global vercel@canary
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
21 changes: 21 additions & 0 deletions .github/workflows/production.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: GitHub Actions Vercel Production Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
push:
branches:
- main
jobs:
Deploy-Production:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Vercel CLI
run: npm install --global vercel@canary
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
4 changes: 1 addition & 3 deletions app/components/ComponentsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,9 @@ export const CheckboxGroupComponent = () => {
)
}
export const DatePickerComponent = () => {
const [date, setDate] = useState<Date | null>(null)
console.log(date)
return (
<div className="mx-auto flex w-3/5 scale-75">
<DatePicker singleDate={setDate} placeholder="Select date">
<DatePicker placeholder="Select date">
<DatePicker.SingleDate />
</DatePicker>
</div>
Expand Down
25 changes: 3 additions & 22 deletions app/docs/components/checkbox/variant/CheckboxVariant.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,10 @@
import { CheckBox } from '../../../../src'

const CheckboxVariant = () => {
const handleChecked = (value: boolean) => {
console.log(value)
}
return (
<div className="flex flex-row gap-3 py-3">
<CheckBox
size="md"
variant="square"
label="Square"
id="square"
name="countries"
color="info"
handleChecked={handleChecked}
/>
<CheckBox
size="md"
variant="circle"
label="Circle"
id="circle"
name="countries"
color="info"
handleChecked={handleChecked}
/>
<CheckBox size="md" variant="square" label="Square" id="square" name="countries" color="info" />
<CheckBox size="md" variant="circle" label="Circle" id="circle" name="countries" color="info" />
</div>
)
}
Expand All @@ -35,7 +16,7 @@ import { CheckBox } from "keep-react";
export const CheckboxComponent = () => {
const handleChecked = (value) => {
console.log(value);
// value is available
};
return (
<>
Expand Down
18 changes: 2 additions & 16 deletions app/docs/components/checkbox/variant/DefaultCheckbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,7 @@
import { CheckBox } from '../../../../src'

const DefaultCheckbox = () => {
const handleChecked = (value: boolean) => {
console.log(value)
}
return (
<div className="py-3">
<CheckBox
variant="square"
label="Checkbox"
id="two"
name="countries"
color="info"
handleChecked={handleChecked}
/>
</div>
)
return <CheckBox variant="square" label="Checkbox" id="two" name="countries" color="info" />
}

const DefaultCheckboxCode = `
Expand All @@ -25,7 +11,7 @@ import { CheckBox } from "keep-react";
export const CheckboxComponent = () => {
const handleChecked = (value) => {
console.log(value);
//value
};
return (
<CheckBox
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
'use client'
import { useState } from 'react'
import { DatePicker } from '../../../../src'

const DatePickerWithTwoMonth = () => {
const [date, setDate] = useState<Date | null>(null)
console.log(date)
return (
<div className="w-1/3">
<DatePicker showTwoMonth={true} singleDate={setDate} placeholder="Select date">
<DatePicker showTwoMonth={true} placeholder="Select date">
<DatePicker.SingleDate />
</DatePicker>
</div>
Expand Down
6 changes: 1 addition & 5 deletions app/docs/components/datePicker/variant/DateRangePicker.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
'use client'
import { useState } from 'react'
import { DatePicker } from '../../../../src'
import { rangePicker } from '../../../../src/components/DatePicker/DatePickerContext'

const DateRangePicker = () => {
const [range, setRangeDate] = useState<rangePicker>()
console.log(range)
return (
<div className="w-1/3">
<DatePicker rangeDate={setRangeDate} placeholder="Start - Finish">
<DatePicker placeholder="Start - Finish">
<DatePicker.Range />
</DatePicker>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
'use client'
import { useState } from 'react'
import { DatePicker } from '../../../../src'
import { rangePicker } from '../../../../src/components/DatePicker/DatePickerContext'

const DateRangePickerWithTwoMonth = () => {
const [date, setRangeDate] = useState<rangePicker>()
console.log(date)
return (
<div className="w-1/3">
<DatePicker showTwoMonth={true} rangeDate={setRangeDate} placeholder="Start - Finish">
<DatePicker showTwoMonth={true} placeholder="Start - Finish">
<DatePicker.Range />
</DatePicker>
</div>
Expand Down
5 changes: 1 addition & 4 deletions app/docs/components/datePicker/variant/DefaultDatePicker.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
'use client'
import { useState } from 'react'
import { DatePicker } from '../../../../src'

const DefaultDatePicker = () => {
const [date, setDate] = useState<Date | null>(null)
console.log(date)
return (
<div className="w-1/3">
<DatePicker singleDate={setDate} placeholder="Date / Month / Year">
<DatePicker placeholder="Date / Month / Year">
<DatePicker.SingleDate />
</DatePicker>
</div>
Expand Down
5 changes: 1 addition & 4 deletions app/docs/components/datePicker/variant/MonthPicker.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
'use client'
import { useState } from 'react'
import { DatePicker } from '../../../../src'

const MonthPicker = () => {
const [month, setMonthPicker] = useState<Date | null | string>()
console.log(month)
return (
<div className="w-1/3">
<DatePicker month={setMonthPicker} placeholder="Select Month">
<DatePicker placeholder="Select Month">
<DatePicker.Month />
</DatePicker>
</div>
Expand Down
5 changes: 1 addition & 4 deletions app/docs/components/datePicker/variant/TimePicker.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
'use client'
import { useState } from 'react'
import { DatePicker } from '../../../../src'

const TimePicker = () => {
const [time, setTime] = useState<string | null | Date>()
console.log(time)
return (
<div className="w-1/3">
<DatePicker time={setTime} placeholder="Select time">
<DatePicker placeholder="Select time">
<DatePicker.Time />
</DatePicker>
</div>
Expand Down
5 changes: 1 addition & 4 deletions app/docs/components/datePicker/variant/YearPicker.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
'use client'
import { useState } from 'react'
import { DatePicker } from '../../../../src'

const YearPicker = () => {
const [year, setYearPicker] = useState<number | Date | null>()
console.log(year)
return (
<div className="w-1/3">
<DatePicker year={setYearPicker} placeholder="Select Year">
<DatePicker placeholder="Select Year">
<DatePicker.Year />
</DatePicker>
</div>
Expand Down
10 changes: 3 additions & 7 deletions app/docs/components/modal/variant/HistoryModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ const HistoryModal = () => {
setShowAccessModal(!showAccessModal)
}

const handleChecked = (value: any) => {
console.log(value)
}

return (
<div className="flex flex-wrap items-end gap-2 px-2 py-3">
<Button type="primary" onClick={onClickHistoryModal}>
Expand All @@ -35,7 +31,7 @@ const HistoryModal = () => {
</p>
</div>
<div className="mt-5 flex items-center">
<CheckBox size="md" variant="square" id="two" name="countries" color="info" handleChecked={handleChecked} />
<CheckBox size="md" variant="square" id="two" name="countries" color="info" />
<label htmlFor="two" className="ml-2 text-body-4 font-medium text-metal-500">
Save on this browser
</label>
Expand Down Expand Up @@ -66,7 +62,7 @@ const HistoryModal = () => {
</div>
</div>
<div className="mt-5 flex items-center">
<CheckBox size="md" variant="square" id="two" name="countries" color="info" handleChecked={handleChecked} />
<CheckBox size="md" variant="square" id="two" name="countries" color="info" />
<label htmlFor="two" className="ml-2 text-body-4 font-medium text-metal-500">
Save on this browser
</label>
Expand Down Expand Up @@ -103,7 +99,7 @@ export const ModalComponent = () => {
};
const handleChecked = (value) => {
console.log(value)
//value
};
return (
Expand Down
3 changes: 2 additions & 1 deletion app/docs/components/switch/variant/DefaultSwitch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const DefaultSwitchCode = `
import { Toggle } from "keep-react";
export const SwitchComponent = () => {
return <Toggle bgColor="primary" size="md" />;
const [toggle, setToggle] = useState(false)
return return <Toggle bgColor="primary" size="md" onChange={setToggle} />
}
`

Expand Down
15 changes: 8 additions & 7 deletions app/docs/components/switch/variant/SwitchSizes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@ const SwitchSizes = () => {
}

const SwitchSizesCode = `
"use client";
import { useState } from "react";
import { Toggle } from "keep-react";
"use client"
import { useState } from "react"
import { Toggle } from "keep-react"
export const SwitchComponent = () => {
const [toggle, setToggle] = useState(false)
return (
<div className="flex gap-5">
<Toggle bgColor="primary" label="Small" size="sm" />
<Toggle bgColor="primary" label="Medium" size="md" />
<Toggle bgColor="primary" label="Large" size="lg" />
<Toggle bgColor="primary" label="Small" size="sm" onChange={setToggle} />
<Toggle bgColor="primary" label="Medium" size="md" onChange={setToggle} />
<Toggle bgColor="primary" label="Large" size="lg" onChange={setToggle} />
</div>
);
)
}
`

Expand Down
5 changes: 3 additions & 2 deletions app/docs/components/switch/variant/SwitchWithBackground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ const SwitchWithBackgroundCode = `
import { Toggle } from "keep-react";
export const SwitchComponent = () => {
const [toggle, setToggle] = useState(false)
return (
<div className="flex gap-5">
<Toggle bgColor="primary" label="Primary" size="md" />
<Toggle bgColor="slate" label="Slate" size="md" />
<Toggle bgColor="primary" label="Primary" size="md" onChange={setToggle} />
<Toggle bgColor="slate" label="Slate" size="md" onChange={setToggle} />
</div>
);
}
Expand Down
3 changes: 2 additions & 1 deletion app/docs/components/switch/variant/SwitchWithIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const SwitchWithIconCode = `
import { Toggle } from "keep-react";
export const SwitchComponent = () => {
return <Toggle bgColor="primary" label="Toggle" size="md" withIcon={true} />;
const [toggle, setToggle] = useState(false)
return <Toggle bgColor="primary" label="Toggle" size="md" withIcon={true} onChange={setToggle} />
}
`
export { SwitchWithIcon, SwitchWithIconCode }
5 changes: 1 addition & 4 deletions app/docs/components/tree/variant/TreeWithCheckbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@ import { Tree } from '../../../../src'
import { nodes } from './DefaultTree'

const TreeWithCheckbox = () => {
const handleChecked = (value: boolean) => {
console.log(value)
}
return (
<div className="overflow-x-auto py-5">
<Tree showCheckbox={true} showItemsNumber={true} showBorder={true} nodes={nodes} handleChecked={handleChecked} />
<Tree showCheckbox={true} showItemsNumber={true} showBorder={true} nodes={nodes} />
</div>
)
}
Expand Down
2 changes: 1 addition & 1 deletion app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const Community = () => {
const result = await response.json()
setContributors(result)
} catch (error) {
console.log(error)
console.error(error)
}
}
getUser()
Expand Down
Loading

0 comments on commit de962de

Please sign in to comment.