-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚸 Add floating menu for block settings
Closes #396
- Loading branch information
1 parent
33adc29
commit 825ed2f
Showing
3 changed files
with
74 additions
and
40 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
apps/builder/src/features/graph/components/nodes/block/SettingsHoverBar.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { BuoyIcon, ExpandIcon } from '@/components/icons' | ||
import { | ||
Button, | ||
HStack, | ||
IconButton, | ||
Link, | ||
useColorModeValue, | ||
} from '@chakra-ui/react' | ||
import { BlockWithOptions } from '@typebot.io/schemas' | ||
import { getHelpDocUrl } from '@/features/graph/helpers/getHelpDocUrl' | ||
|
||
type Props = { | ||
blockType: BlockWithOptions['type'] | ||
onExpandClick: () => void | ||
} | ||
|
||
export const SettingsHoverBar = ({ blockType, onExpandClick }: Props) => { | ||
const helpDocUrl = getHelpDocUrl(blockType) | ||
return ( | ||
<HStack | ||
rounded="md" | ||
spacing={0} | ||
borderWidth="1px" | ||
bgColor={useColorModeValue('white', 'gray.800')} | ||
shadow="md" | ||
> | ||
<IconButton | ||
icon={<ExpandIcon />} | ||
borderRightWidth="1px" | ||
borderRightRadius="none" | ||
borderLeftRadius="none" | ||
aria-label={'Duplicate group'} | ||
variant="ghost" | ||
onClick={onExpandClick} | ||
size="xs" | ||
/> | ||
<Button | ||
as={Link} | ||
leftIcon={<BuoyIcon />} | ||
borderLeftRadius="none" | ||
size="xs" | ||
variant="ghost" | ||
href={helpDocUrl} | ||
isExternal | ||
> | ||
Help | ||
</Button> | ||
</HStack> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 1 addition & 26 deletions
27
.../components/nodes/block/HelpDocButton.tsx → ...c/features/graph/helpers/getHelpDocUrl.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
825ed2f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
landing-page-v2 – ./apps/landing-page
landing-page-v2-typebot-io.vercel.app
landing-page-v2-git-main-typebot-io.vercel.app
www.get-typebot.com
typebot.io
www.typebot.io
get-typebot.com
825ed2f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
builder-v2 – ./apps/builder
builder-v2-typebot-io.vercel.app
builder-v2-git-main-typebot-io.vercel.app
app.typebot.io
825ed2f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
viewer-v2 – ./apps/viewer
zebra.cr8.ai
bergamo.store
bot.krdfy.com
bot.tvbeat.it
cgcassets.com
cnvhub.com.br
facelabko.com
filmylogy.com
goldorayo.com
rabbit.cr8.ai
shop.mexwa.my
signup.cr8.ai
start.taxt.co
turkey.cr8.ai
vhpage.cr8.ai
vitamyway.com
am.nigerias.io
an.nigerias.io
app.yvon.earth
ar.nigerias.io
bot.enreso.org
bot.rslabs.pro
bots.bridge.ai
chat.hayuri.id
chat.uprize.hu
chatgpt.lam.ee
chicken.cr8.ai
gollum.riku.ai
gsbulletin.com
journey.cr8.ai
panther.cr7.ai
panther.cr8.ai
pay.sifuim.com
penguin.cr8.ai
talk.gocare.io
test.bot.gives
ticketfute.com
unicorn.cr8.ai
apo.nigerias.io
apr.nigerias.io
aso.nigerias.io
blackcan.cr8.ai
bot.4display.nl
bot.ageenda.com
bot.artiweb.app
bot.devitus.com
bot.jesopizz.it
bot.reeplai.com
bot.renovato.it
bot.scayver.com
bot.tc-mail.com
chat.lalmon.com
chat.sureb4.com
eventhub.com.au
fitness.riku.ai
games.klujo.com
sakuranembro.it
sellmycarbr.com
typebot.aloe.do
bot.contakit.com
bot.piccinato.co
bot.sv-energy.it
botc.ceox.com.br
clo.closeer.work
cockroach.cr8.ai
faqs.nigerias.io
form.syncwin.com
haymanevents.com
kw.wpwakanda.com
myrentalhost.com
stan.vselise.com
start.taxtree.io
typebot.aloe.bot
voicehelp.cr8.ai
zap.fundviser.in
app.bouclidom.com
app.chatforms.net
bot.hostnation.de
bot.maitempah.com
bot.phuonghub.com
bot.reviewzer.com
bot.rihabilita.it
cares.urlabout.me
chat.gaswadern.de
chat.gniorder.com
chat.rojie.online
fmm.wpwakanda.com
footballmeetup.ie
gentleman-shop.fr
k1.kandabrand.com
chat.marius.digital
chat.sr7digital.com
chatbot.matthesv.de
chatbot.repplai.com
demo.botscientis.us
demo.wemakebots.xyz
hrbot.robomotion.io
inearephones.cr8.ai
kbsub.wpwakanda.com
limitenahora.com.br
825ed2f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
docs – ./apps/docs
docs-typebot-io.vercel.app
docs.typebot.io
docs-git-main-typebot-io.vercel.app