Skip to main content

Activity for ds.twiceware.de

Active on:

Loading activity...

SharedGitHub
Posted: Dependabot, I don't like you, either!Bluesky network
PostedBluesky network

Instead of an Easter lamb, an app over the holidays. Fortunately, my component library has survived the update to InertiaJS 3. #haraka #smtp #dropbox #buildinpublic #email

  • Screenshot of the profile section in a web app.
PostedBluesky network

PDF-Container / PDF-Viewer React Shadcn #react #shadcn

  • Screenshot of the PdfContainer
  • Screenshot of the PdfViewer (Promise)
  • import { PdfViewer } from '@/components/twc-ui/pdf-viewer'
const doSomething = async () => {
    await PdfViewer.call({
      file: '/compressed.tracemonkey-pldi-09.pdf'
  })
}
  • import { PdfContainer } from '@/components/twc-ui/pdf-container'

export const Demo = () => {
  return (
    <PdfContainer file="/compressed.tracemonkey-pldi-09.pdf" />
  )
}

export default Demo
Posted: Alert dialog with promise #react #shadcnBluesky network
PostedBluesky network

Sneak preview: A DRYer form with precognition. #reactjs #shadcn #intertiajs #laravel

  • import { DemoContainer } from '@/components/docs/DemoContainer'
import { Button } from '@/components/twc-ui/button'
import { Form, useForm } from '@/components/twc-ui/form'
import { FormGroup } from '@/components/twc-ui/form-group'
import { TextField } from '@/components/twc-ui/textfield'
import { Head } from '@inertiajs/react'

interface Props {
  contact: App.Data.ContactData
}

export default function FormDemo ({ contact }: Props) {
  const form = useForm<App.Data.ContactData>(
    'contact-form',
    'post',
    route('contact.store'),
    contact
  )

  return (
    <DemoContainer>
      <Head title="Form Demo" />
      <Form form={form} errorVariant="field">
        <FormGroup>
          <div className="col-span-12">
            <TextField
              label="First name"
              {...form.register('first_name')}
            />
          </div>
          <div className="col-span-12">
            <TextField
              label="Last name"
              {...form.register('last_name')}
            />
          </div>
          <div className="col-span-12">
            <TextField
              label="E-Mail"
              {...form.register('email')}
            />
          </div>
          <div className="col-span-12">
            <Button title="Save" type="submit" />
          </div>
        </FormGroup>
      </Form>
    </DemoContainer>
  )
}